package com.ctgu.fastleader.service.serviceImpl;

import com.ctgu.fastleader.dao.GoodsMapper;
import com.ctgu.fastleader.service.GoodsService;
import com.ctgu.fastleader.vo.Goods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {

    @Autowired
    GoodsMapper goodsMapper;

    @Override
    public int insertSelective(Goods record) {
        return goodsMapper.insertSelective(record);
    }

    @Override
    public List<Goods> findAllGoods() {
        return goodsMapper.findAllGoods();
    }

    @Override
    public List<Goods> searchGoodsByKeyWord(Integer goodsid, String goodsname) {
        return goodsMapper.searchGoodsByKeyWord(goodsid,goodsname);
    }

    @Override
    public int selectGoodsNumLow() {
        return goodsMapper.selectGoodsNumLow();
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return goodsMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Goods record) {
        return goodsMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public Goods selectByPrimaryKey(Integer goodsid) {
        return goodsMapper.selectByPrimaryKey(goodsid);
    }
}
